<?php
namespace Home\Controller;
use Home\Controller\HomeController;
class MapController extends HomeController {
    public function index(){
       $timestamp = time();
       $nonceStr  = uniqid();
       $jsapi_ticket = $this ->jsapi_ticket;
       $url = 'http://'.$_SERVER['SERVER_NAME'].'/index.php/Home/Map/index.html'; 
       $str = "jsapi_ticket=$jsapi_ticket&noncestr=$nonceStr&timestamp=$timestamp&url=$url";
       $signature = sha1($str);
       $this -> assign('appid',$this->config['appid']);
       $this -> assign('timestamp',$timestamp);
       $this -> assign('signature',$signature);
       $this -> assign('nonceStr',$nonceStr);
       $this -> display();
    }
    
}